package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class ObjectOutputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        Message message = new Message(1,"标题");
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("d:/message.txt"));
        oos.writeObject(message);


        oos.close();
    }
}
